
import type { App } from 'vue'
import Dialog from './dialog'
import Input from './input'
import DropDownTree from './drop-down-tree'
const components = [
  Dialog,
  Input,
  DropDownTree
]
// 定义 install 方法
const install = (app: App): void => {
  // 遍历并注册全局组件
  components.forEach(component => {
    app.component(component.name, component)
  }
  )
}

//  全局引用可自动安装
if (typeof window !== 'undefined' && window.Vue) {
  install(window.Vue)
}

export {
  Dialog,
  Input,
  DropDownTree
}

export default install //umd



